package chp05;

import java.util.Scanner;

public class Test6 {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        //次数不定循环
        while (true){
            System.out.println("添加购物车成功,需要继续购物吗?(y/n):");
            String answer = input.next();
            if(answer.equals("n")){
                break;
            }
        }
        System.out.println("回家吃饭...");
    }
}
